# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html

import scrapy


# 获取中图网的数据封装成Item对象
class BookItem(scrapy.Item):
    # 图片
    image = scrapy.Field()
    # 书名
    name = scrapy.Field()
    # 作者
    author = scrapy.Field()
    # 出版社
    publisher = scrapy.Field()
    # 评分
    start_wrap = scrapy.Field()
    # 评论数
    comment = scrapy.Field()
    # 售价
    sell_price = scrapy.Field()
    # 折扣
    discount = scrapy.Field()
    # 定价
    price_tit = scrapy.Field()
    # 排名
    num = scrapy.Field()
    # 抓取时间
    crawl_time = scrapy.Field()
    # 抓取链接
    crawl_url = scrapy.Field()


# 获取孔夫子旧书网的数据封装成Item对象
class KongfzBookItem(scrapy.Item):
    # 排名
    rank = scrapy.Field()
    # 作者
    author = scrapy.Field()
    # 作者url
    url = scrapy.Field()
    # 书名
    book_name = scrapy.Field()
    # 简介
    content_introduction = scrapy.Field()
    # 图片
    img_url = scrapy.Field()
    # isbn号
    isbn = scrapy.Field()
    # 新书价格
    new_min_price = scrapy.Field()
    # 旧书价格
    old_min_price = scrapy.Field()
    # 出版社
    press = scrapy.Field()
    # 出版社url
    press_url = scrapy.Field()
    # 定价
    price = scrapy.Field()
    # 出版时间
    pub_date = scrapy.Field()
    # 抓取时间
    crawl_time = scrapy.Field()
    # 抓取链接
    crawl_url = scrapy.Field()


class dedaoBookItem(scrapy.Item):
    # 图片
    index_img = scrapy.Field()
    # 简介
    introduction = scrapy.Field()
    # 作者
    lecturer_name = scrapy.Field()
    # 书号
    log_id = scrapy.Field()
    # 类型
    log_type = scrapy.Field()
    # 书名
    name = scrapy.Field()
    # 价格
    price = scrapy.Field()
    # 出版社
    publish_time = scrapy.Field()
    # 评分
    score = scrapy.Field()
    # 抓取时间
    crawl_time = scrapy.Field()
    # 抓取链接
    crawl_url = scrapy.Field()
